#include <windows.h>
#include <stdio.h>

int main(int argc, char** argv)
{
	const char* pszText;
	char* pszConv = 0;
	int len;

	if(argc < 2)
		return -1;
	pszText = argv[1];

	len = LCMapString(0x0804, LCMAP_SIMPLIFIED_CHINESE, pszText, -1, 0, 0);
	pszConv = (char*) malloc(sizeof(char) * len);

	LCMapString(0x0804, LCMAP_SIMPLIFIED_CHINESE, pszText, -1, pszConv, len);

	printf("%s\n", pszConv);
	free(pszConv);
	return 0;
}
